<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.6.0" />

	<title>Class DIMySQL</title>

	<script type="text/javascript" src="resources/combined.js?428767200"></script>
	<script type="text/javascript" src="elementlist.js?4200546020"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?2495970611" />

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
			<h3>Namespaces</h3>
			<ul>
				<li class="active"><a href="namespace-None.html">None</a>
						</li>
				<li><a href="namespace-PHP.html">PHP</a>
						</li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-DIBase.html">DIBase</a></li>
				<li><a href="class-DIConfig.html">DIConfig</a></li>
				<li><a href="class-DIContext.html">DIContext</a></li>
				<li><a href="class-DIContext_Inject.html">DIContext_Inject</a></li>
				<li><a href="class-DIDBConfig.html" class="invalid">DIDBConfig</a></li>
				<li><a href="class-DIDo.html">DIDo</a></li>
				<li><a href="class-DIEntity.html">DIEntity</a></li>
				<li><a href="class-DIError.html">DIError</a></li>
				<li><a href="class-DIErrorCode.html">DIErrorCode</a></li>
				<li><a href="class-DIEvent.html">DIEvent</a></li>
				<li><a href="class-DIFilterMap.html">DIFilterMap</a></li>
				<li><a href="class-DIFilterUtil.html">DIFilterUtil</a></li>
				<li><a href="class-DIInclude.html">DIInclude</a></li>
				<li><a href="class-DIIncludeConfig.html">DIIncludeConfig</a></li>
				<li><a href="class-DIInject.html">DIInject</a></li>
				<li><a href="class-DILet.html">DILet</a></li>
				<li><a href="class-DIModel.html">DIModel</a></li>
				<li><a href="class-DIModelUtil.html">DIModelUtil</a></li>
				<li class="active"><a href="class-DIMySQL.html">DIMySQL</a></li>
				<li><a href="class-DIRoute.html">DIRoute</a></li>
				<li><a href="class-DIRuntime.html">DIRuntime</a></li>
				<li><a href="class-DIRuntime_Imported.html">DIRuntime_Imported</a></li>
				<li><a href="class-DIService.html">DIService</a></li>
				<li><a href="class-DITpl.html">DITpl</a></li>
				<li><a href="class-DIUrlShell.html">DIUrlShell</a></li>
				<li><a href="class-Global1Filter.html">Global1Filter</a></li>
				<li><a href="class-Global2Filter.html">Global2Filter</a></li>
				<li><a href="class-Global3Filter.html">Global3Filter</a></li>
				<li><a href="class-OrekiUtil.html">OrekiUtil</a></li>
				<li><a href="class-TemplateDo.html">TemplateDo</a></li>
				<li><a href="class-Test.html">Test</a></li>
				<li><a href="class-TestDo.html">TestDo</a></li>
				<li><a href="class-TestInject.html">TestInject</a></li>
				<li><a href="class-TesttestDo.html">TesttestDo</a></li>
				<li><a href="class-XxxFilter.html">XxxFilter</a></li>
				<li><a href="class-YyyFilter.html">YyyFilter</a></li>
			</ul>

			<h3>Interfaces</h3>
			<ul>
				<li><a href="class-DIEvent_AppendFuncListener.html">DIEvent_AppendFuncListener</a></li>
				<li><a href="class-DIEvent_AppendVariableListener.html">DIEvent_AppendVariableListener</a></li>
				<li><a href="class-DIEvent_CallFuncListener.html">DIEvent_CallFuncListener</a></li>
				<li><a href="class-DIEvent_CallStaticFuncListener.html">DIEvent_CallStaticFuncListener</a></li>
				<li><a href="class-DIEvent_ClassCallListener.html">DIEvent_ClassCallListener</a></li>
				<li><a href="class-DIEvent_DestroyListener.html">DIEvent_DestroyListener</a></li>
				<li><a href="class-DIEvent_GetStaticVariableListener.html">DIEvent_GetStaticVariableListener</a></li>
				<li><a href="class-DIEvent_GetVariableListener.html">DIEvent_GetVariableListener</a></li>
				<li><a href="class-DIEvent_ObjCallListener.html">DIEvent_ObjCallListener</a></li>
				<li><a href="class-DIEvent_ObjCreateListener.html">DIEvent_ObjCreateListener</a></li>
				<li><a href="class-DIEvent_SetStaticVariableListener.html">DIEvent_SetStaticVariableListener</a></li>
				<li><a href="class-DIEvent_SetVariableListener.html">DIEvent_SetVariableListener</a></li>
				<li><a href="class-DIEventListener.html">DIEventListener</a></li>
				<li><a href="class-DIFilter.html">DIFilter</a></li>
				<li><a href="class-DIModelTemplate.html">DIModelTemplate</a></li>
			</ul>


			<h3>Exceptions</h3>
			<ul>
				<li><a href="class-DIException.html">DIException</a></li>
			</ul>


			<h3>Functions</h3>
			<ul>
				<li><a href="function-__autoload.html">__autoload</a></li>
				<li><a href="function-arg.html">arg</a></li>
				<li><a href="function-array_unset.html">array_unset</a></li>
				<li><a href="function-bt_page.html">bt_page</a></li>
				<li><a href="function-bt_shell_page.html">bt_shell_page</a></li>
				<li><a href="function-component_exist.html">component_exist</a></li>
				<li><a href="function-create_class.html">create_class</a></li>
				<li><a href="function-dump.html">dump</a></li>
				<li><a href="function-getip.html">getip</a></li>
				<li><a href="function-import.html">import</a></li>
				<li><a href="function-inject.html">inject</a></li>
				<li><a href="function-inject_dymic.html">inject_dymic</a></li>
				<li><a href="function-inject_full.html">inject_full</a></li>
				<li><a href="function-inject_func.html">inject_func</a></li>
				<li><a href="function-injectObjFunc.html">injectObjFunc</a></li>
				<li><a href="function-invoke_func.html">invoke_func</a></li>
				<li><a href="function-invoke_method.html">invoke_method</a></li>
				<li><a href="function-let.html">let</a></li>
				<li><a href="function-let_exists.html">let_exists</a></li>
				<li><a href="function-params_to_str.html">params_to_str</a></li>
				<li><a href="function-putjson.html">putjson</a></li>
				<li><a href="function-putjsonp.html">putjsonp</a></li>
				<li><a href="function-redirect.html">redirect</a></li>
				<li><a href="function-ref_arr.html">ref_arr</a></li>
				<li><a href="function-session.html">session</a></li>
				<li><a href="function-session_exists.html">session_exists</a></li>
				<li><a href="function-session_remove.html">session_remove</a></li>
				<li><a href="function-url.html">url</a></li>
			</ul>
		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="namespace-None.html" title="Summary of None"><span>Namespace</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class DIMySQL</h1>


	<div class="description">
	
<p>具体的MySQL驱动</p>

	</div>

	<dl class="tree">
		<dd style="padding-left:0px">
<b><span>DIMySQL</span></b>			
			 implements 
				<a href="class-DIModelTemplate.html"><span>DIModelTemplate</span></a>
			
			
		</dd>
	</dl>








	<div class="info">
		
		
		
		

		<b>Located at</b> <a href="source-class-DIMySQL.html#156" title="Go to source code">__model.php</a><br />
	</div>


	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="__construct" id="___construct">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___construct">#</a>
		<code><a href="source-class-DIMySQL.html#165" title="Go to source code">__construct</a>( <span> <var>$table</var></span>, <span><code><a href="class-DIModel.html">DIModel</a></code> <var>$M</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






		</div>
		</div></td>
	</tr>
	<tr data-order="connect" id="_connect">

		<td class="attributes"><code>
			 public 
			<code><a href="class-PDO.html">PDO</a></code>
			&amp;
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_connect">#</a>
		<code><a href="source-class-DIMySQL.html#170" title="Go to source code">connect</a>( )</code>

		<div class="description short">
			
<p>连接并获取句柄</p>

		</div>

		<div class="description detailed hidden">
			
<p>连接并获取句柄</p>




				<h4>Returns</h4>
				<div class="list">
					<code><code><a href="class-PDO.html">PDO</a></code></code><br />
				</div>



				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_connect">DIModelTemplate::connect</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="query" id="_query">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_query">#</a>
		<code><a href="source-class-DIMySQL.html#185" title="Go to source code">query</a>( <span> <var>$sql</var></span>, <span> <var>$params</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>示例 $month = date("Y-m-d", strtotime($date)); $sql = "SELECT * FROM
pai2_signin WHERE uid =:uid AND signin_date LIKE '{$month}%' ORDER BY signin_id
ASC "; $rs = $this-&gt;query($sql, array('uid' =&gt; $uid));</p>

		</div>

		<div class="description detailed hidden">
			
<p>示例 $month = date("Y-m-d", strtotime($date)); $sql = "SELECT * FROM
pai2_signin WHERE uid =:uid AND signin_date LIKE '{$month}%' ORDER BY signin_id
ASC "; $rs = $this-&gt;query($sql, array('uid' =&gt; $uid));</p>







				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_query">DIModelTemplate::query</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="insert" id="_insert">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_insert">#</a>
		<code><a href="source-class-DIMySQL.html#199" title="Go to source code">insert</a>( <span> <var>$data</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_insert">DIModelTemplate::insert</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="update" id="_update">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_update">#</a>
		<code><a href="source-class-DIMySQL.html#212" title="Go to source code">update</a>( <span>array <var>$cond</var></span>, <span> <var>$data</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_update">DIModelTemplate::update</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="alter" id="_alter">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_alter">#</a>
		<code><a href="source-class-DIMySQL.html#220" title="Go to source code">alter</a>( <span>array <var>$cond</var></span>, <span> <var>$field</var></span>, <span> <var>$optval</var> = <span class="php-quote">'+1'</span></span> )</code>

		<div class="description short">
			
<p>在原字段值基础上修改（一个字段） 如 alter(array('id'=&gt;1,
'key'=&gt;'k1'), 'nums', '-5') 还没试过符号：*、/、%</p>

		</div>

		<div class="description detailed hidden">
			
<p>在原字段值基础上修改（一个字段） 如 alter(array('id'=&gt;1,
'key'=&gt;'k1'), 'nums', '-5') 还没试过符号：*、/、%</p>







				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_alter">DIModelTemplate::alter</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="alterByExpr" id="_alterByExpr">

		<td class="attributes"><code>
			 public 
			boolean|number
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_alterByExpr">#</a>
		<code><a href="source-class-DIMySQL.html#230" title="Go to source code">alterByExpr</a>( <span>array <var>$cond</var></span>, <span>array <var>$exprs</var></span> )</code>

		<div class="description short">
			
<p>在原字段值基础上修改（自定义表达式，可以改多个字段）</p>

		</div>

		<div class="description detailed hidden">
			
<p>在原字段值基础上修改（自定义表达式，可以改多个字段）</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$cond</var></dt>
					<dd><code>array</code></dd>
					<dt><var>$exprs</var></dt>
					<dd><code>array</code><br>如：array("nums=nums+1", "<code>value</code>=<code>value</code>-1")</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean|number</code><br />
				</div>



				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_alterByExpr">DIModelTemplate::alterByExpr</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="delete" id="_delete">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_delete">#</a>
		<code><a href="source-class-DIMySQL.html#244" title="Go to source code">delete</a>( <span>array <var>$cond</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_delete">DIModelTemplate::delete</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="select" id="_select">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_select">#</a>
		<code><a href="source-class-DIMySQL.html#250" title="Go to source code">select</a>( <span> <var>$conditions</var> = <span class="php-keyword1">array</span>()</span>, <span> <var>$field</var> = <span class="php-quote">''</span></span>, <span> <var>$order</var> = <span class="php-keyword1">null</span></span>, <span> <var>$limit</var> = <span class="php-keyword1">null</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_select">DIModelTemplate::select</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="find" id="_find">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_find">#</a>
		<code><a href="source-class-DIMySQL.html#265" title="Go to source code">find</a>( <span> <var>$conditions</var> = <span class="php-keyword1">array</span>()</span>, <span> <var>$field</var> = <span class="php-quote">''</span></span>, <span> <var>$order</var> = <span class="php-keyword1">null</span></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_find">DIModelTemplate::find</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="count" id="_count">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_count">#</a>
		<code><a href="source-class-DIMySQL.html#271" title="Go to source code">count</a>( <span> <var>$conditions</var> = <span class="php-keyword1">null</span></span>, <span> <var>$bindparams</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>两种方式统计总数 示例：$t = DIModelUtil::supertable('table');
1、$t-&gt;count(array('id'=&gt;2)); 2、$t-&gt;count(array('id &gt; :id'),
array('id'=&gt;2));</p>

		</div>

		<div class="description detailed hidden">
			
<p>两种方式统计总数 示例：$t = DIModelUtil::supertable('table');
1、$t-&gt;count(array('id'=&gt;2)); 2、$t-&gt;count(array('id &gt; :id'),
array('id'=&gt;2));</p>







				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_count">DIModelTemplate::count</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="execute" id="_execute">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_execute">#</a>
		<code><a href="source-class-DIMySQL.html#295" title="Go to source code">execute</a>( <span> <var>$sql</var> = <span class="php-keyword1">null</span></span>, <span> <var>$params</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_execute">DIModelTemplate::execute</a></code></div>
		</div>
		</div></td>
	</tr>
	<tr data-order="pager" id="_pager">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_pager">#</a>
		<code><a href="source-class-DIMySQL.html#334" title="Go to source code">pager</a>( <span> <var>$page</var></span>, <span> <var>$pageSize</var> = <span class="php-num">10</span></span>, <span> <var>$scope</var> = <span class="php-num">10</span></span>, <span> <var>$total</var></span> )</code>

		<div class="description short">
			
		</div>

		<div class="description detailed hidden">
			






				<h4>Implementation of</h4>
				<div class="list"><code><a href="class-DIModelTemplate.html#_pager">DIModelTemplate::pager</a></code></div>
		</div>
		</div></td>
	</tr>
	</table>







	<table class="summary" id="properties">
	<caption>Properties summary</caption>
	<tr data-order="_conn" id="$_conn">

		<td class="attributes"><code>
			protected static
			
		</code></td>

		<td class="name">
				<a href="source-class-DIMySQL.html#161" title="Go to source code"><var>$_conn</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_conn" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="table" id="$table">

		<td class="attributes"><code>
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-DIMySQL.html#162" title="Go to source code"><var>$table</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$table" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_M" id="$_M">

		<td class="attributes"><code>
			protected 
			
		</code></td>

		<td class="name">
				<a href="source-class-DIMySQL.html#163" title="Go to source code"><var>$_M</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$_M" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	</table>



</div>

	<div id="footer">
		 API documentation generated by <a href="http://apigen.org">ApiGen 2.6.0</a>
	</div>
</div>
</div>
</body>
</html>
